#ifndef AST_DECLARATIONS_TYPE_NAME_H
#define AST_DECLARATIONS_TYPE_NAME_H

#include "../ASTNode.h"
class SpecifierQualifierList;
class AbstractDeclarator;

/*
C99   6.7.6
type-name:
		specifier-qualifier-list   abstract-declarator(opt)
*/
class TypeName : public ASTNode
{
protected:
	TypeName(void)
		: ASTNode(ASTNode::specifier_qualifier_list){};
public:
	TypeName(SpecifierQualifierList *pSpecQualList, AbstractDeclarator *pAbstractDecl = NULL)
		: ASTNode(ASTNode::specifier_qualifier_list)
		, m_pSpecQualList(pSpecQualList)
		, m_pAbstractDecl(pAbstractDecl){};


	virtual ~TypeName(void);

	virtual void					codeGen();

protected:
	SpecifierQualifierList *			m_pSpecQualList;
	AbstractDeclarator *				m_pAbstractDecl;//may be NULL
};


#endif


